package com.simba.server.components;

import com.simba.server.ServerParam;
import org.apache.log4j.Logger;
import com.simba.common.log.LogUtil;

public class SorterParams
{
    private static class SorterParameterHolder
	{
		private static SorterParams INSTANCE = new SorterParams();
	}

	protected final static Logger logger = Logger.getLogger(SorterParams.class);

	public static SorterParams getInstance()
	{
		return SorterParameterHolder.INSTANCE;
	}

	private int logSaveDays;
	private boolean newThreadEachRequest;
    private int uploadNum;
    private boolean multiCodeCheck;
    private int restorePacketOffDays;
    private int restoreSlotPackDays;
    private int restoreBoxDays;
    private int deleteDataTime;
    private int syncDataTime;
    private boolean checkBarcode;
    private int sorterType;
    private boolean repeatUpload;
    private boolean allowChange;

	private SorterParams()
	{
	}

    public int getLogSaveDays() {
        return logSaveDays;
    }

    public void setLogSaveDays(int logSaveDays) {
        this.logSaveDays = logSaveDays;
    }

    public boolean isNewThreadEachRequest() {
        return newThreadEachRequest;
    }

    public void setNewThreadEachRequest(boolean newThreadEachRequest) {
        this.newThreadEachRequest = newThreadEachRequest;
    }

    public int getUploadNum() {
        return uploadNum;
    }

    public void setUploadNum(int uploadNum) {
        this.uploadNum = uploadNum;
    }

    public boolean isMultiCodeCheck() {
        return multiCodeCheck;
    }

    public void setMultiCodeCheck(boolean multiCodeCheck) {
        this.multiCodeCheck = multiCodeCheck;
    }

    public int getRestorePacketOffDays() {
        return restorePacketOffDays;
    }

    public void setRestorePacketOffDays(int restorePacketOffDays) {
        this.restorePacketOffDays = restorePacketOffDays;
    }

    public int getRestoreSlotPackDays() {
        return restoreSlotPackDays;
    }

    public void setRestoreSlotPackDays(int restoreSlotPackDays) {
        this.restoreSlotPackDays = restoreSlotPackDays;
    }

    public int getRestoreBoxDays() {
        return restoreBoxDays;
    }

    public void setRestoreBoxDays(int restoreBoxDays) {
        this.restoreBoxDays = restoreBoxDays;
    }

    public int getDeleteDataTime() {
        return deleteDataTime;
    }

    public void setDeleteDataTime(int deleteDataTime) {
        this.deleteDataTime = deleteDataTime;
    }

    public int getSyncDataTime() {
        return syncDataTime;
    }

    public void setSyncDataTime(int syncDataTime) {
        this.syncDataTime = syncDataTime;
    }

    public boolean isCheckBarcode() {
        return checkBarcode;
    }

    public void setCheckBarcode(boolean checkBarcode) {
        this.checkBarcode = checkBarcode;
    }

    public int getSorterType() {
        return sorterType;
    }

    public void setSorterType(int sorterType) {
        this.sorterType = sorterType;
    }

    public boolean getRepeatUpload() {
        return repeatUpload;
    }

    public void setRepeatUpload(boolean repeatUpload) {
        this.repeatUpload = repeatUpload;
    }

    public boolean isAllowChange() {
        return allowChange;
    }

    public void setAllowChange(boolean allowChange) {
        this.allowChange = allowChange;
    }

    public boolean isDebugMode(){
        if (ServerParam.NEED_DEBUG==null){
            return false;
        }
        return ServerParam.NEED_DEBUG.equalsIgnoreCase("true");
    }

    public void init() {
    }
}
